package com.googlecode.afdbaccess.web.common.db.converters;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

import com.googlecode.afdbaccess.cache.resultconversion.helpers.SingleRowResultSetConverter;
import com.googlecode.afdbaccess.cache.resultconversion.simpleconverters.SimpleMapsInListConverter;
import com.googlecode.afdbaccess.web.common.json.ExtJsJsonResponse;

public class SimpleExtJsJsonResponseSingleRowConverter extends SingleRowResultSetConverter<ExtJsJsonResponse> {
    @Override
    public ExtJsJsonResponse convertSingleRowToData(ResultSet resultSet) throws SQLException {
        SimpleMapsInListConverter converter = new SimpleMapsInListConverter();
        
        Map<String, Object> returnedRow = converter.convertSingleRowToData(resultSet);
        
        return new ExtJsJsonResponse(returnedRow);
    }
}
